<table class="layui-table" style="width:2500px;" id="contentTab">
 	<input type="hidden" id="billid" th:value="${bom.id}"/>
 	<input type="hidden" id="companyId" th:value="${bom.companyId}"/>
  <thead>
    <tr>
    	 <th><input type="checkBox" lay-skin="primary" name="headCheckBox" lay-filter="headCheckBox"/></th>
      	 <th data-field="id">主键</th>
      	 <th data-field="bomId">父件id</th>
      	 <th data-field="companyName">公司信息</th>
      	 <!-- <th data-field="companyId">公司id</th> -->
      	 
      	 <th data-field="materialCode">子件编码</th>
      	 <!-- <th data-field="materialInfoId">物料信息Id</th> -->
      	 <th data-field="materialName">子件名称</th>
		 <th data-field="materialSpec">子件规格</th>
		 <th data-field="measurementUName">计量单位</th>
		 <th data-field="materialBomVersion">子件BOM版本</th>
      	 <!-- <th data-field="materialBomId">子件BomId</th> -->
		 
		 <th data-field="numeratorDosage">分子用量</th>
		 <th data-field="denominatorDosage">分母用量</th>
		 <th data-field="requirementDosage">需求量</th>
		 <th data-field="attritionRate">损耗率%</th>
		 <th data-field="productionDosage">生产用量</th>
		 <th data-field="remark">备注</th>
    </tr>
     </thead>
    <tbody>
    <tr th:each="item : ${details}" class="edittr" >
    	<td style="width:100px;"><input type="checkBox" lay-skin="primary" name="trCheckBox"/></td>
		<td style="width:100px;"><input type="hidden" name="id" th:value="${item.id}"/></td>
		<td style="width:100px;"><input type="hidden" name="bomId" th:value="${item.bomId}"/><span th:text="${item.bomId}"></span></td>
		<td name='companyId' style="background-color:#f3f2f2;width:200px;" value="${item.companyId}"/><span th:text="${item.companyName}"></span></td>
		<td style="width:150px;padding-left:0px;padding-right:0px;">
			<input type="text" name="materialCode" class="layui-input" style="width:150px;" th:value="${item.materialCode}"/>
			<input type="hidden" name="materialInfoId" class="layui-input" style="width:150px;" th:value="${item.materialInfoId}"/>
		</td>
		<td name='materialName' style="background-color:#f3f2f2;width:200px;" th:text="${item.materialName}"></td>
		<td name='materialSpec' style="background-color:#f3f2f2 ;width:200px" th:text="${item.materialSpec}"></td>
		
		<td name="measurementUName" style="background-color:#f3f2f2;width:200px" th:text="${item.measurementUName}"></td>
		
		<td style="width:150px;padding-left:0px;padding-right:0px;">
			<input type="text" name="materialBomVersion" class="layui-input" style="width:150px;" th:value="${item.materialBomVersion}"/>
			<input type="hidden" name="materialBomId" class="layui-input" style="width:150px;" th:value="${item.materialBomId}"/>
		</td>
		<td style="padding-left:0px;padding-right:0px;width:120px;">
		 <input 
		 onkeyup="this.value=this.value.replace(/\D|^0/g,'')" onafterpaste="this.value=this.value.replace(/\D|^0/g,'')"
		 style="width:120px;" type="number" name="numeratorDosage" required  lay-verify="required|number" placeholder="分子用量" autocomplete="off" class="layui-input" th:value="${item.numeratorDosage}">
		 </td>
		 <td style="padding-left:0px;padding-right:0px;width:120px;">
		 <input 
		 onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}"
		 style="width:120px;" type="number" name="denominatorDosage" required  lay-verify="required|number" placeholder="分母用量" autocomplete="off" class="layui-input" th:value="${item.denominatorDosage}">
		 </td>
		 <td style="padding-left:0px;padding-right:0px;width:120px;">
		 <input 
		 onkeyup="this.value=this.value.replace(/\D|^0/g,'')" onafterpaste="this.value=this.value.replace(/\D|^0/g,'')"
		 style="width:120px;background-color:#f3f2f2;" type="number" name="requirementDosage" required  lay-verify="required|number" placeholder="需求量" readOnly='true'  autocomplete="off" class="layui-input" th:value="${item.requirementDosage}">
		 </td>
		 <td style="padding-left:0px;padding-right:0px;width:120px;">
		 <input style="width:120px;" type="number" min="0" max="100" name="attritionRate"  required  lay-verify="required|number" placeholder="损耗率%" autocomplete="off" class="layui-input" th:value="${item.attritionRate}">
		 </td>
		 <td style="padding-left:0px;padding-right:0px;width:120px;">
		 <input 
		 onkeyup="this.value=this.value.replace(/\D|^0/g,'')" onafterpaste="this.value=this.value.replace(/\D|^0/g,'')"
		 style="width:120px; background-color:#f3f2f2;" type="number" name="productionDosage" required  lay-verify="required|number" placeholder="生产用量" readOnly='true' autocomplete="off" class="layui-input" th:value="${item.productionDosage}">
		 </td>
		 <td style="padding-left:0px;padding-right:0px;">
			<input type="text" name="remark" class="layui-input" th:value="${item.remark}"/>
		</td>
	</tr>
	</tbody>
</table>
<table style="display:none;" id="blankTpl">
<tbody>
<tr class="edittr">
		<td style="width:100px;"><input type="checkBox" lay-skin="primary" name="trCheckBox" lay-filter="trCheckBox"/></td>
		<td style="width:100px;"><input type="hidden" name="id" /></td>
		<td style="width:100px;"><input type="hidden" name="bomId" value="${bom.id}"/><span th:text="${bom.id}"></span></td>
		<td style="width:200px;"><input type="hidden" name="companyId" value="${bom.companyId}"/><span th:text="${bom.companyName}"></span></td>
		
		<td style="width:150px;padding-left:0px;padding-right:0px;">
			<input type="text" name="materialCode" class="layui-input" style="width:150px;"/>
			<input type="hidden" name="materialInfoId" class="layui-input" style="width:150px;"/>
		</td>
		<td name='materialName' style="background-color:#f3f2f2;width:200px;"></td>
		<td name='materialSpec' style="background-color:#f3f2f2;width:200px"></td>
		
		<td name="measurementUName" style="background-color:#f3f2f2 ;width:200px"></td>
		
		<td style="width:150px;padding-left:0px;padding-right:0px;">
			<input type="text" name="materialBomVersion" class="layui-input" style="width:150px;"/>
			<input type="hidden" name="materialBomId" class="layui-input" style="width:150px;"/>
		</td>
		<td style="padding-left:0px;padding-right:0px;width:120px;">
		 <input style="width:120px;" type="number" name="numeratorDosage" required  lay-verify="required|number" placeholder="分子用量" autocomplete="off" class="layui-input">
		 </td>
		 <td style="padding-left:0px;padding-right:0px;width:120px;">
		 <input style="width:120px;" type="number" name="denominatorDosage" required  lay-verify="required|number" placeholder="分母用量" autocomplete="off" class="layui-input">
		 </td>
		 <td style="padding-left:0px;padding-right:0px;width:120px;">
		 <input style="width:120px;" type="number" name="requirementDosage" required  lay-verify="required|number" placeholder="需求量" autocomplete="off" class="layui-input">
		 </td>
		 <td style="padding-left:0px;padding-right:0px;width:120px;">
		 <input style="width:120px;" type="number" name="attritionRate" required  lay-verify="required|number" placeholder="损耗率%" autocomplete="off" class="layui-input">
		 </td>
		 <td style="padding-left:0px;padding-right:0px;width:120px;">
		 <input style="width:120px;" type="number" name="productionDosage" required  lay-verify="required|number" placeholder="生产用量" autocomplete="off" class="layui-input">
		 </td>
		<td style="padding-left:0px;padding-right:0px;">
			<input type="text" name="remark" class="layui-input"/>
		</td>
		
	</tr>
	</tbody>
</table>